[Contents]
[Index]
[Help]
[Browse <]
[Browse >]
dopus addappicon <port> <label> <id> [pos <x> <y>] [icon <filename>]
[quotes] [info] [snap] [close] [local] [locked]
[menu <stem>] [base <base>]
This command allows you to add your own AppIcons to the Opus (and
optionally the Workbench) screen from ARexx. You can specify an icon image
to use, the label of the icon and the position on the screen, as well as
several other parameters. You can also specify the items for the pop-up
menu for the new icon. Opus sends messages to the message port you specify
- see the example scripts provided for more information on how to receive
and process these messages.
The parameters for addappicon are:-
port - the name of the port messages are sent to
label - the icon label (text displayed under the icon)
id - your own ID for the icon; this is returned in
messages
pos - position for the icon (xy coordinates)
icon - optional pathname of icon file to use
(without the .info suffix)
quotes - specify this keyword if you want filenames
quoted when sent to the message port
info - if you want "Information" to work on this icon
snap - if you want "Snapshot" to work on this icon
close - if you want "Close" instead of "Open" in
the pop-up menu
local - if you want the icon to be local to Opus
(and not appear on Workbench)
locked - the icon will start out locked in position,
unable to be moved
menu - name of a stem variable containing
your own menu items
base - allows you to specify the base ID of
messages sent from the pop-up menu
The menu parameter allows you to specify your own items for the icon's
pop-up menu. The stem variable must be in the following format:
stem.COUNT - number of items
stem.0 - item 1
stem.1 - item 2
etc.
If you specify "---" as an item, a separator bar will appear.
When you receive a message that the user has selected one of these menu
items, the message will contain the ID of the item. This is the value
corresponding to the item's position in the stem array (eg 0 for item 1, 1
for item 2, etc). If the base field is specified, the value given for the
base will be added to this ID.
This command returns an appicon handle in RESULT if it is successful.
This same handle can be passed to dopus setappicon to modify the icon,
and must be passed to dopus remappicon to remove the appicon when you
are finished.
If you do not specify an icon file to use then the system's default "tool"
icon will be used for the image.
Messages from the appicon are sent to the port you specified. The messages
are structured in much the same way as messages sent from listers, so
there's no reason you shouldn't be able to use the same code for both. For
more information, see the Custom Handlers section.
See also:
dopus setappicon
dopus remappicon
AppIcon Handlers
Converted on 04 Nov 1998 with RexxDoesAmigaGuide2HTML 2.2 by Michael Ranner.